package models

import "time"

// 文章表

type Article struct {
	Id       int       `orm:"pk;auto"`
	Title    string    `orm:"size(32)"`
	Content  string    `orm:"type(text)"`
	ImgUrl   string    `orm:"default()"`
	Amount   int       `orm:"default(0)"`
	Category int       `orm:"default(0)"`
	UpdateAt time.Time `orm:"auto_now;type(datetime)"` // 每次更新时间
	User     *User     `orm:"rel(fk)"`                 // 设置一对多关系
	Tags     []*Tag    `orm:"rel(m2m)"`
}
